package com.wbp.cms.core.project.dao;

import java.util.List;
import org.springframework.stereotype.Repository;
import com.wbp.cms.client.project.domain.ContractDO;
import com.wbp.cms.client.project.query.ContractQuery;
import com.wbp.cms.core.dao.BaseDao;

/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月9日 下午3:07:08
 */
@Repository("contractDAO")
public class ContractDAO extends BaseDao {

  
  public Long  insert(ContractDO  contractDO){
    super.insert("ContractMapper.insert", contractDO) ;
    return  contractDO.getId() ;
  }
  
  public int  update(ContractDO  contractDO){
      return  super.update("ContractMapper.update", contractDO) ;
  }
  
  public ContractDO  load(Long  id){
    Object obj = super.selectOneObject("ContractMapper.load", id) ;
    return obj == null ? null : (ContractDO)obj ;
  }
  
  public ContractDO  loadByProjectId(Long  projectid){
    Object obj = super.selectOneObject("ContractMapper.loadByProjectId", projectid) ;
    return obj == null ? null : (ContractDO)obj ;
  }
  
  public List<ContractDO>  query(ContractQuery  ContractQuery){
    return super.selectList("ContractMapper.query", ContractQuery) ;
  }
  
  public Integer  queryCount(ContractQuery  ContractQuery){
    Object obj = super.selectOneObject("ContractMapper.queryCount", ContractQuery) ;
    return obj == null ? null : (Integer)obj ;
  }
  
  
}
